<div class="hbox hbox-auto-xs hbox-auto-sm" ng-init="
    app.settings.asideFolded = false; 
    app.settings.asideDock = false;
  ">
	<!-- main -->
	<div class="wrapper-md">
		<div class="panel panel-default">
			<div class="panel-heading">

				<form class="form-search">
					<label for="name">角色名称：</label> <input id="name" type="text" ng-model="vm.infoRole.roleName" class="input-medium search-query" >
					<button type="submit" class="btn btn-primary button_modify" style="margin-left: 20px;" ng-click="queryList()" >搜索</button>
					<button class="btn btn-success button_modify" style="float:right"  data-toggle="modal" data-target="#addRoleModal" ng-click="intiAddRole()" >新增角色</button>
					<button class="btn btn-success button_modify" style="float:right;margin-right: 10px;"  data-toggle="modal" data-target="#addAuthForRoleModal" ng-click="initAddAuthForRole()" >授权资源</button>
				</form>
			</div>
		</div>

		<div class="table-responsive">
			<table id="roleTable"></table>
		</div>
	</div>
	
	<!--
    	作者：dabing9
    	时间：2017-10-24
    	描述：usersRole模态框
    -->
	<div class="modal fade" id="addRoleModal" tabindex="-1" data-keyboard="false" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"  ng-click="close()">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel">角色添加</h4>
				</div>

				<div class="modal-body">

					<form class="form-horizontal" ng-submit="add()" role="form" name="form">
						<input type="hidden" ng-model="vm.editInfoRole.id" >
						<div class="form-group">
							<label for="roleName" class="col-sm-3 control-label">角色名称：</label>
							<div class="col-sm-4">
								<input type="text" class="form-control" id="roleName" ng-model="vm.editInfoRole.roleName" required>
							</div>
						</div>
						<div class="form-group" style="margin-top: 10px;">
							<label for="roleCode" class="col-sm-3 control-label">角色编号：</label>
							<div class="col-sm-4">
								<input type="text" class="form-control" id="roleCode" ng-model="vm.editInfoRole.codeName" required>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">角色描述：</label>
							<div class="col-sm-6">
								<textarea class="form-control" rows="3" ng-model="vm.editInfoRole.remark" required></textarea>
							</div>
						</div>
					</form>

				</div>
				<div class="modal-footer">
					<button type="submit" class="col-sm-2 btn btn-primary"
							style="margin-left: 40%;"
							ng-disabled="userform.userId.$dirty && userform.userId.$invalid ||
  						userform.userName.$dirty && userform.userName.$invalid ||
  						userform.phoneNum.$dirty && userform.phoneNum.$invalid ||
  						userform.email.$dirty && userform.email.$invalid"
							ng-click="add()">
						保存
					</button>
				</div>
			</div>
		</div>
	</div>


	<!--
    	作者：dabing9
    	时间：2017-10-24
    	描述：授权角色资源模态框
    -->
	<div class="modal fade" id="addAuthForRoleModal" tabindex="-1" data-keyboard="false" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true"  ng-click="close()">&times;</span></button>
					<h4 class="modal-title" id="authForRoleLabel">授权资源</h4>
				</div>

				<div class="modal-body">
					<ul id="authForRoleTree" class="ztree"></ul>
				</div>

				<div class="modal-footer">
					<button type="submit" class="col-sm-2 btn btn-primary"
							style="margin-left: 40%;"
							ng-click="addAuthForRole()">
						保存
					</button>
				</div>
			</div>
		</div>
	</div>

</div>